package org.leiyang.common.etcd;

public class EtcdConfigFactory {
    private static IConfigCenter configCenter;

    private EtcdConfigFactory() {}

    public static IConfigCenter configCenter() {
        return configCenter;
    }

    /**
     * 创建IConfigCenter的入口方法
     * @param etcdServer 如https://127.0.0.1:2379 有多个时逗号分隔
     */
    public static void buildConfigCenter(String etcdServer) {
        //连接多个时，逗号分隔
        configCenter = MyEtcdBuilder.build(etcdServer);
    }
}
